-- GENERATED SPELL FOR [Deathshadow Archon] --


function spell0_22343(pUnit, Event) --@Bloodthirst,n/a--
pUnit:FullCastSpellOnTarget(31996,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22343', 0, 1)
end

function spell1_22343(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_22343', 593, 1)
end

function Sorts_22343(pUnit, Event)
local choix_sorts_22343 = math.random(0, 1)
if choix_sorts_22343 == 0 then
pUnit:RegisterEvent('spell0_22343', 1, 1)
end
if choix_sorts_22343 == 1 then
pUnit:RegisterEvent('spell1_22343', 1, 1)
end
end

function mob22343_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22343', math.random(1500, 3000), 1)
end

function mob22343_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22343_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22343_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22343, 1, 'mob22343_Action')
RegisterUnitEvent(22343, 2, 'mob22343_Leave')
RegisterUnitEvent(22343, 3, 'mob22343_Kill')
RegisterUnitEvent(22343, 4, 'mob22343_Die')
